package com.avic.dal.mapper;

import com.avic.dal.condition.PageQueryFileListCondition;
import com.avic.dal.model.FileConfigManager;
import com.avic.dal.model.FileManager;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: huangsheng
 * @date: 2018/9/3
 */
@Mapper
public interface FileManageMapper {

    /**
     * 查询附件列表
     *
     * @param pageQueryFileListCondition
     * @return
     */
    List<FileManager> itemList(PageQueryFileListCondition pageQueryFileListCondition);

    /**
     * 查询数据总数
     *
     * @param pageQueryFileListCondition
     * @return
     */
    int queryRecordsTotal(PageQueryFileListCondition pageQueryFileListCondition);

    /**
     * 新增
     *
     * @param fileManager
     * @return
     */
    int insert(FileManager fileManager);

    /**
     * 删除
     *
     * @param fileId
     * @return
     */
    int delete(int fileId);

    int updateFileCountConfig(@Param("fileCountConfig") int fileCountConfig);

    FileConfigManager selectFileCountConfig();

    int fileTotalCount();

    FileManager queryItemById(int fileId);
}
